home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
optans10.zip
/
OPTANSI.REF
< prev
next >
Wrap
Text File
|
1992-06-14
|
12KB
|
226 lines
*******************************************************************************
OptANSI Library
version 1.0
Copyright 1992 Michael Dannov
Optimizing ANSI Output Library for Borland C
*******************************************************************************
QUICK REFERENCE
*INCLUDE FILES*
--FILENAME----USAGE/INFORMATION-----------------------------------------------
OPTANSI.H Use in all applications and functions that use OptANSI functions
Declares macros, prototypes, and some structures
AUSER.H Use if you prefer to use OptANSI functions as procedures instead
of functions that return a string, make sure to modify the macro
aout() to call an output function of your choice
*GLOBAL VARIABLES*
--VARIABLE---TYPE---DESCRIPTION-----------------------------------------------
acurattr char Current color
axpos char Current x position on screen
aypos char Current y position on screen
ashortcuts char Flags for available ANSI shortcuts/behavior
astr char15 Buffer area for ANSI result string
*MACRO VALUES*
--MACRO--VAL--NOTES-----------------------------------------------------------
ESC 27
ashotcuts macros
--MACRO--BIT--RULES-----------------------------------------------------------
aBKSP 1 True if backspace (char 8, ^H) is nondestructive
aLF 2 True if linefeed (char 10, ^J) moves cursor down only, if
false, assumes LF is equivalent to CR/LF combination
aCR 4 True if carriage return (char 13, ^M) moves the cursor to
left margin on the same line only
aCLRSCR 8 True if clear screen (char 12, ^L) clears the entire screen
to the current color, Telix requires this true
aRESET 64 True if reset color (ESC[m) resets the color to lightgray on
black (7), almost always true, QModem might require this true
aNANSI 128 True if you want to use NANSI or FANSI extensions.
Colors
--MACRO-------VAL--DESCRIPTION------------------------------------------------
BLACK 0 Dark colors
BLUE 1
GREEN 2
CYAN 3
RED 4
MAGENTA 5
BROWN 6
LIGHTGRAY 7
DARKGRAY 8 Light colors
LIGHTBLUE 9
LIGHTGREEN 10
LIGHTCYAN 11
LIGHTRED 12
LIGHTMAGENTA 13
YELLOW 14
WHITE 15
HIGHLIGHT 8 Add to Highlight Dark Colors Only
BLINK 128 Add to Blink any color
setmodes
--MACRO--------VAL--NOTES-----------------------------------------------------
BW40 0 Text 40x25, 16 colors (ANSI colors override B&W modes)
C40 1 Text 40x25, 16 colors
BW80 2 Text 80x25, 16 colors (ANSI colors override B&W modes)
C80 3 Text 80x25, 16 colors
G320_200 4 Graphics 320x200, 4 colors
G320_200GR 5 Graphics 320x200, 4 grey colors
G640_200BW 6 Graphics 640x200, 2 colors - black & white
G320_200V 13 Graphics 320x200, 16 colors, (VGA)
G640_200V 14 Graphics 640x200, 16 colors, (VGA)
G640_350V 16 Graphics 640x350, 16 colors, (VGA)
G640_480BWV 17 Graphics 640x480, 2 colors - black & white, (VGA)
G640_480V 18 Graphics 640x480, 16 colors, (VGA)
G300_200V 19 Graphics 300x200, 256 colors, (VGA)
ROWS43 43 Switch to 43 row mode, NANSI ONLY ROWS50 50 Switch to 50 row mode, NANSI ONLY aCURSORWRAP 7 Changes cursorwrap variables
aBIOSTTY 97 Changes bios or writetty mode, NANSI ONLY aWRITE_TTY 97 same as above
aBIOSTTY 97 same as above
aFASTSCROLL 98 Changes to fast scroll mode, NANSI ONLY aGRAPHICSCURSOR 99 Changes graphics cursor, NANSI ONLY
*FUNCTIONS*
--FUNCTION DECLARATION | DESCRIPTION------------------------CATAGORY/NOTES----
char *ablink() COLOR
Set blink bit of current color
char *aclrbol() MISC / NONSTD
Clear line from cursor to beginning of line
char *aclreol() MISC
Clears the line from the cursor to the end of the line
char *aclrline() MISC / NONSTD
Clears entire line
char *aclrscr() MISC
Clears the screen and homes the cursor
char *aclrscrabove() MISC / NONSTD
Clears screen above and left of cursor position
char *aclrscrbelow() MISC / NONSTD
Clears screen below and right of cursor position
char *acmd(char num, char cmd) MISC
Creates a universal ANSI string based on its parameters
char *acolor(char nc) COLOR
Change current color/attribute
char *acursorwrap() MISC
Turns cursorwrap on
char *adelchar(char x) MISC / NONSTD
Deletes characters starting at cursor
char *adelline(char y) MISC / NONSTD
Delete lines starting at current
char *adim() COLOR
Clear highlight bit of current color
char *adown(char y) LOCATE
Move the cursor down y positions
char *aforcecolor(char nc) COLOR
Forces color to new color value ignoring optimizations
char *aforcegotoxy(char x, char y) LOCATE
Forces location of the cursor to new x and y ignoring optimizations
char *agotoxy(char x, char y) LOCATE
Locates the cursor to new x and y location
char *ahighlight() COLOR
Set highlight bit of current color
char *ahighvideo() COLOR
Set highlight bit of current color
char *ahome() LOCATE
Move cursor to top left corner of screen: 1, 1
int ainit() MISC
Initialize OptANSI functions and variables
char *ainschar(char x) MISC / NONSTD
Insert chars starting at cursor
char *ainsline(char y) MISC / NONSTD
Insert a line before the current line
char *ainvisible(equation) COLOR / NONSTD
Set current color to a color defined by invisible command
char *akeyboard(int key, char *str, char *buf) MISC
Reassign keyboard keys
char *aleft(char x) LOCATE
Move the cursor left x positions
char *alowvideo() COLOR
Clear highlight bit of current color
char *amode(int mode, char cmd) MISC
Function for use with asetmode and aresetmode
char *anoblink() COLOR
Clear blink bit of current color
char *anocursorwrap() MISC
Turns cursorwrap off
char *anohighlight() COLOR
Clear highlight bit of current color
char *anoinvisible(equation) COLOR / NANSI
Turn invisible off
char *anormvideo() COLOR
Clear highlight bit of current color
anotshort(char nflags) INIT
Define ashortcuts = all flags on except nflags
char *aresetcolor() COLOR
Sets color to reset color, white on black (7)
char *aresetmode(int mode) MISC
Resets mode to an ANSI defined mode or changes display rules
char *arestorecursor() LOCATE
Resto